package com.imooc.demo.service.impl;

import com.imooc.demo.dao.TalkDao;
import com.imooc.demo.entity.Talk;
import com.imooc.demo.service.TalkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TalkServiceImpl implements TalkService {
    @Autowired
    TalkDao talkDao;
    @Override
    public boolean insertTalk(Talk talk) {
        return talkDao.insertTalk(talk);
    }

    @Override
    public List<Talk> allTalkList() {
        return talkDao.allTalkList();
    }

    @Override
    public List<Talk> talkList(String buyerOpenid) {
        return talkDao.talkList(buyerOpenid);
    }

    @Override
    public boolean deleteTalk(Talk talk) {
        return talkDao.deleteTalk(talk);
    }

    @Override
    public Talk getTalk(Integer talkId) {
        return talkDao.getTalk(talkId);
    }
}
